<meta charset="UTF-8">
<?php
require 'function.php';
$db = require 'db.php';
unset($db[$_GET['id']]);

if(save($db)){
	$result = array(
		'state'=>'success',
		'message'=>'删除成功',
	);
	echo json_encode($result);
}
else
{
	$result = array(
		'state'=>'error',
		'message'=>'删除失败'
	);
	echo json_encode($result);
}
